package com.cl.erp_2301.Service.impl;

import com.cl.erp_2301.dto.GoodsTypeDTO;
import com.cl.erp_2301.entity.GoodsType;
import com.cl.erp_2301.mapper.GoodsTypeMapper;
import com.cl.erp_2301.Service.GoodsTypeService;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class GoodsTypeServiceImpl implements GoodsTypeService {
    @Resource
    private GoodsTypeMapper goodsTypeMapper;

    @Override
    public List<GoodsType> listByPage() {
        return this.goodsTypeMapper.listByPage();
    }

    @Override
    public GoodsType selectone(Integer id) {
        return null;
    }

    @Override
    public void update(GoodsTypeDTO goodsTypeDTO) {
        goodsTypeMapper.update(goodsTypeDTO);
    }

    @Override
    public GoodsType findByNme(String name) {
        return goodsTypeMapper.findByNme(name);
    }

    @Override
    public GoodsType update(Integer id) {
        return goodsTypeMapper.update(id);
    }

    @Override
    public GoodsType deleteById() {
        return goodsTypeMapper.deleteById();
    }

    @Override
    public void add(GoodsTypeDTO goodsTypeDTO) {
        goodsTypeMapper.add(goodsTypeDTO);
    }

    @Override
    public GoodsType findByNameLike(String name) {
        return goodsTypeMapper.findByNameLike(name);
    }

    @Override
    public GoodsType getGoodsTypeById(Integer uuid) {
        return goodsTypeMapper.getGoodsTypeById(uuid);
    }

    @Override
    public GoodsType add(String name) {
        return goodsTypeMapper.add(name);
    }

    @Override
    public void deleteById(Integer id) {
        goodsTypeMapper.deleteById(id);
    }
}
